import 'package:basic_common/common_exports.dart';
import 'package:basic_widgets/app_bar_widget.dart';
import 'package:basic_widgets/button_widget.dart';
import 'package:basic_widgets/input_widget.dart';
import 'package:basic_widgets/text_widget.dart';
import 'resetpwd_controller.dart';

class ResetPwdPage extends GetView<ResetPwdController> {
  const ResetPwdPage({super.key});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: backAppbar(title: "修改密码"),
      body: Container(
        color: Colors.white,
        padding: EdgeInsets.symmetric(horizontal: ScreenHelper.width(15)),
        child: Column(
          children: [
            norTitle(title: "旧密码"),
            inputBox(
                inputController: controller.oldPwdController,
                hintText: "请输入旧密码",
                obscureText: true),
            norTitle(title: "新密码"),
            inputBox(
                inputController: controller.newPwdController,
                hintText: "请输入新密码",
                obscureText: true),
            norTitle(title: "再次输入"),
            inputBox(
                inputController: controller.confirmPwdController,
                hintText: "再次输入新密码",
                obscureText: true),
            SizedBox(
              height: ScreenHelper.height(20),
            ),
            btnComponent(onPressed: () {
              controller.resetPwd();
            }, textStr: "确定", isEnable: true)
          ],
        ),
      ),
    );
  }
}
